/**
 * Created by Administrator on 2018\6\21 0021.
 */
//权限加载
$(function () {
    $(".btn_reload").click(function () {
    var url = $(this).data("url");
    $.dialog({
        title:'温馨提示',
        content:'亲,加载缓慢,请赖心等待',
        icon:'succeed',
        cancel:true,
        ok:function () {
            var dg=$.dialog({
                title:'温馨提示',
                icon:'succeed',
                close:function () {
                    window.location.reload();
                }
            });
            //发送ajax请求
            $.get(url,{},function (data) {
                if(data.success){
                    dg.content('加载成功').button({
                        name:'确定',
                        callback:function () {
                            window.location.reload();
                        }
                    });
                }
            },"json");
        }

    });
});
})